<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
	function a() {
		document.write("<table>");
		for (var i = 9; i >= 1; i--) {
			document.write("<tr>");
			for (var j = 1; j <= i; j++) {
				if (j%2!=0) {
					document.write('<td style="background:red;width:80px;text-align:center">'+j+"*"+i+"="+i*j+"</td>");
				}
				if (j%2==0 && i%2!=0) {
					document.write('<td style="background:blue;width:80px;text-align:center">'+j+"*"+i+"="+i*j+"</td>");
				};
				if (j%2==0 && i%2==0) {
					document.write('<td style="background:gray;width:80px;text-align:center">'+j+"*"+i+"="+i*j+"</td>");
				};
			}
			document.write("</tr>");
		}
		document.write("</table>");
	}
	a();
	</script>
</head>
<body>
	
</body>
</html>